package com.zang.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

import javax.annotation.Resource;

/**
 * @author Zhang Qiang
 * @date 2019/10/24 9:37
 */

@Configuration
@PropertySource("classpath:db.properties")
public class EvnConfig {

    @Resource
    Environment env;

    public String getProperties(String key){
        return env.getProperty(key);
    }
}
